%!TEX program = xelatex
% 完整编译: xelatex -> biber/bibtex -> xelatex -> xelatex
\documentclass[lang=cn,11pt,a4paper]{elegantpaper}

% 本文档命令
\usepackage{array}
\usepackage{tikz}
\usepackage{pgf-pie}
\usepackage{pgfplots}
\usepackage{float}
\usepackage{amssymb}
\newcommand{\ccr}[1]{\makecell{{\color{#1}\rule{1cm}{1cm}}}}
%\usepackage[mathscr]{euscript}

\begin{document}

\title{Programming-Chapter4}

\author{周游}

%\date{\zhtoday}

\maketitle


\section*{\uppercase\expandafter{A}}

由图像可知，三种看似等价的运算方式，得到不同的结果。而且波动f>g>h。

这是因为h只要做一次减法和7次乘法，g交替做7次加减法和乘法，f做的乘法和加减法最多。故h(x)最精确。

\begin{figure}[H]
    \centering
    \includegraphics[width=0.8\textwidth]{A.png}
    \caption{f,g,h}
\end{figure}

\section*{\uppercase\expandafter{B}}
\begin{itemize}
    \item 
    $UFL(\mathbb{F}) = \beta^L = 0.5 , OFL(\mathbb{F}) = \beta^U(\beta-\beta^{1-p} = 3.5$
    \item 
    全部的浮点数为 $1.xx \times 2^e$ , 其中 x 取 0,1 , e 取 -1,0,1 , 故加上0有 25 个:（见下表）\\

    \begin{table}[h!]
        \begin{center}
            \caption{F中的所有数（除了0）}
          \begin{tabular}{l c c r} % <-- Alignments: 1st column left, 2nd middle and 3rd right, with vertical lines in between
            \hline
            $1.00 \times 2^{-1}$ & $1.01 \times 2^{-1}$ & $1.10 \times 2^{-1}$ & $1.11 \times 2^{-1}$\\
            $1.00 \times 2^{ 0}$ & $1.01 \times 2^{ 0}$ & $1.10 \times 2^{ 0}$ & $1.11 \times 2^{ 0}$\\
            $1.00 \times 2^{ 1}$ & $1.01 \times 2^{ 1}$ & $1.10 \times 2^{ 1}$ & $1.11 \times 2^{ 1}$\\
            \hline
          \end{tabular}
        \end{center}
      \end{table}

    by corollary on the cardinality of $\mathbb{F}$ , \# $ \mathcal{F} = 25$  \\
    \item 
    换算成十进制分别为0.5 -0.5 0.625 -0.625 0.75 -0.75 0.875 -0.875 1 -1 1.25 -1.25 1.5 -1.5 1.75 -1.75 2 -2 2.5 -2.5 3 -3 3.5 -3.5 0 , 在实轴上见下图
    \begin{figure}[H]
        \centering
        \includegraphics[width=0.6\textwidth]{B1.png}
    \end{figure}
    \item
    subnormal numbers are  $\pm 0.01 \times 2^{-1}, \pm 0.10 \times 2^{-1}, \pm 0.11 \times 2^{-1}$
    \item
    plot the extended F on real axis : 
    \begin{figure}[H]
        \centering
        \includegraphics[width=0.6\textwidth]{B2.png}
    \end{figure}
  \end{itemize}


\end{document} 